﻿@model BDGetQuote.Web.Models.Manufacturer

@{
    Layout = "~/Views/Shared/_BlankPage.cshtml";
    ViewBag.Title = "BD Quote - Edit Manufacturer";
}

@Html.Raw(ViewBag.InitialScript)
@using (Html.BeginForm("Edit", "Manufacturer", FormMethod.Post, new { EncType = "multipart/form-data" }))
{

    @Html.HiddenFor(model => model.ManufacturerId)
    @Html.HiddenFor(model => model.IsSystem)
    @Html.HiddenFor(model => model.CreatedBy)
<table class="full-width" cellspacing="2" cellpadding="2">
    <tr>
        <td style="width:110px;">Name*:</td>
        <td>
            @Html.TextBoxFor(model => model.Name, new { style = "width:50%;" })
            @Html.ValidationMessage("Name")
        </td>
    </tr>
    <tr>
        <td>Logo:</td>
        <td>
            @if (String.IsNullOrEmpty(Model.ImageUrl))
            {
                <img class="logo-manu-detail img-polaroid" alt="logo" src="@ViewBag.DomainUrl/Content/Images/no-image.png" /><br />
            }
            else
            {
                 <img class="logo-manu-detail img-polaroid" alt="logo" src="@ViewBag.DomainUrl/@Model.ImageUrl" /><br />
            }
            @Html.HiddenFor(model => model.ImageUrl)
        </td>
    </tr>
    <tr>
        <td></td>
        <td>
            <input id="uplLogo" type="file" name="uplLogo" />
            <div class="field-validation-error">@ViewBag.ErrorMessage</div>
        </td>
    </tr>
    <tr>
        <td style="vertical-align:top">Description:</td>
        <td>
            @Html.TextAreaFor(model => model.Description, new { style = "width:98%; height:50px;", cols = "20", rows = "2" })
        </td>
    </tr>
    <tr>
        <td colspan="2" class="text-center">
            <button type="submit" class="btn btn-primary" data-dismiss="modal" >Save</button>
            <button class="btn" type="button" onclick="window.parent.ClosePopupAddManufacturer()">Close</button>
        </td>
    </tr>
</table>
}
